<?php /* Smarty version Smarty-3.1.14, created on 2016-06-01 19:53:40
         compiled from "..\views\edit.html" */ ?>
<?php /*%%SmartyHeaderCode:26329574e9f6037ca04-41000398%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '995854e05d8b4a846a11a1fb31899bd0dafcca8f' => 
    array (
      0 => '..\\views\\edit.html',
      1 => 1464782017,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '26329574e9f6037ca04-41000398',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_574e9f6041cca3_80127645',
  'variables' => 
  array (
    'data' => 0,
    'foo' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_574e9f6041cca3_80127645')) {function content_574e9f6041cca3_80127645($_smarty_tpl) {?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<link rel="stylesheet" href="../public/style/css/ch-ui.admin.css">
	<link rel="stylesheet" href="../public/style/font/css/font-awesome.min.css">
</head>
<body>
    <!--面包屑导航 开始-->
    <div class="crumb_warp">

        <i class="fa fa-home"></i> <a href="../controllers/IndexController.php">首页</a> &raquo; 查看详情
    </div>
    <!--面包屑导航 结束-->

	<!--结果集标题与导航组件 开始-->
	<div class="result_wrap">
        <div class="result_title">
            <h3>快捷操作</h3>
        </div>
        <div class="result_content">
            <div class="short_wrap">
                <a href="../controllers/CreateController.php"><i class="fa fa-plus"></i>新增文章</a>
            </div>
        </div>
    </div>
    <!--结果集标题与导航组件 结束-->

    <div class="result_wrap">
        <div style="text-align: center">
            <span><h2><?php echo $_smarty_tpl->tpl_vars['data']->value['info']['title'];?>
</h2></span>
            <span>作者:<?php echo $_smarty_tpl->tpl_vars['data']->value['info']['username'];?>
</span>
            <hr />
            <div style="width: 80%;text-align: left;">
                <?php echo $_smarty_tpl->tpl_vars['data']->value['info']['content'];?>

            </div>
            <br>
            <br>
        </div>
    </div>

    <div class="result_wrap">
        <table class="add_tab">
            <?php  $_smarty_tpl->tpl_vars['foo'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['foo']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['data']->value['comment']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['foo']->key => $_smarty_tpl->tpl_vars['foo']->value){
$_smarty_tpl->tpl_vars['foo']->_loop = true;
?>
                <tr>
                    <th width="120px" style="text-align: center;">评论用户: <?php echo $_smarty_tpl->tpl_vars['foo']->value['username'];?>
</th>
                    <td>
                        <?php echo $_smarty_tpl->tpl_vars['foo']->value['comment'];?>

                    </td>
                </tr>
            <?php } ?>
        </table>
    </div>
    <br>

    <div class="result_wrap">
        <form action="../controllers/EditController.php" method="post">
            <table class="add_tab">
                <tbody>
                    <tr>
                        <th>发表你的评论：</th>
                        <td>
                            <input type="hidden" name="blog_id" value="<?php echo $_smarty_tpl->tpl_vars['data']->value['info']['id'];?>
">
                            <textarea id="one" class="lg" name="comment" ></textarea>
                        </td>
                    </tr>
                    <tr>
                        <th></th>
                        <td>
                            <input onclick="return check()" type="submit" value="提交">
                            <input type="button" class="back" onclick="history.go(-1)" value="返回">
                        </td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>

</body>
</html>
<script>
    function check(){
        val = document.getElementById('one').value;
        if(val == ''){
            alert('评论不能为空!!!');
            return false;
        }else{
            return true;
        }

    }
</script><?php }} ?>